window.onload = function(){
    var aLi = document.querySelectorAll('.img li');
    var index = 0;
    setInterval(autoMove,800);

      var lastindex = 0;
    function autoMove(){
        index ++;
        if(index == aLi.length){
            index = 0;
        }
       
        aLi[lastindex].className='';
        aLi[index].className='active';
        lastindex = index;


    }
 
}


    













